﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DataModels
{
    public static class staticRandom
    {
        static Random rand = new Random();

        public static int getRandomInt(int max)
        {
            return rand.Next(max);
        }
        public static int getRandomInt(int min, int max)
        {
            if (min <= max)
                return rand.Next(max - min) + min;
            else
                throw new Exception("min Larger then max");
        }
        public static float getRandomFloat(float max)
        {
            return (float)rand.NextDouble() * max;
        }


    }
}
